-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[WIP] Allow various StdLib protocols: ~Copyable #85079
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@swift-ci Please test |
|
Love it. Ship it. |
30dac0a to
3313de1
Compare
|
@swift-ci please test |
| let _ = x < 2 // expected-error {{value of optional type 'Int?' must be unwrapped to a value of type 'Int'}} | ||
| // expected-note@-1 {{coalesce using '??' to provide a default when the optional value contains 'nil'}} {{12-12= ?? <#default value#>}} | ||
| // expected-note@-2 {{force-unwrap using '!' to abort execution if the optional value contains 'nil'}} {{12-12=!}} | ||
| let _ = x < 2 // expected-error {{binary operator '<' cannot be applied to operands of type 'Int?' and 'Int'}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like there's some dedicated diagnostic that we're no longer getting here, but I'm not sure how much value it was adding to begin with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah tbh I feel like the newer diagnostic is better
d20e485 to
e0b3ecd
Compare
|
@swift-ci please smoke test |
e0b3ecd to
510c0b8
Compare
|
@swift-ci please smoke test |
|
@swift-ci please test source compatibility |
Adds
Equatable: ~Copyable. First step towards makingEquatable,ComparableandHashablenoncopyable and nonescapable compliant.